package com.entor.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.entor.model.User;
import com.entor.service.UserService;

@Controller
@RequestMapping("/user")
public class UserController {
	
	@Autowired
	private UserService us;
	
	@RequestMapping("/find")
	@ResponseBody
	public List<User> find(User u){
		return us.find(u);
	}
	@RequestMapping("/findUser")
	@ResponseBody
	public List<User> findUser(User u){
		return us.findUser(u);
	}
	
	@RequestMapping("/index")
	public String index() {
		return "/user/index";
	}

}
